import { Table,Button } from 'antd';

 const mockQualityInspections = [
  {
    inspection_id: 1,
    part_id: 101,
    inspection_date: '2025-03-01',
    inspector_id: 201,
    inspection_items: '外观、尺寸',
    inspection_standards: '外观无瑕疵，尺寸符合公差范围',
    inspection_result: '合格'
  },
  {
    inspection_id: 2,
    part_id: 102,
    inspection_date: '2025-03-02',
    inspector_id: 202,
    inspection_items: '性能、功能',
    inspection_standards: '性能指标达标，功能正常',
    inspection_result: '不合格',
    unqualified_reasons: '性能指标未达到标准值'
  },
  {
    inspection_id: 3,
    part_id: 103,
    inspection_date: '2025-03-03',
    inspector_id: 201,
    inspection_items: '材料成分',
    inspection_standards: '材料成分符合要求',
    inspection_result: '合格'
  }
]

const columns = [
  {
    title: '检验 ID',
    dataIndex: 'inspection_id',
    key: 'inspection_id'
  },
  {
    title: '零配件 ID',
    dataIndex: 'part_id',
    key: 'part_id'
  },
  {
    title: '检验日期',
    dataIndex: 'inspection_date',
    key: 'inspection_date'
  },
  {
    title: '检验人员 ID',
    dataIndex: 'inspector_id',
    key: 'inspector_id'
  },
  {
    title: '检验项目',
    dataIndex: 'inspection_items',
    key: 'inspection_items'
  },
  {
    title: '检验标准',
    dataIndex: 'inspection_standards',
    key: 'inspection_standards'
  },
  {
    title: '检验结果',
    dataIndex: 'inspection_result',
    key: 'inspection_result'
  },
  {
    title: '不合格原因',
    dataIndex: 'unqualified_reasons',
    key: 'unqualified_reasons'
  }
];

const QualityInspectionList = () => {
  return (
    <div style={{ margin:24 }}>
    <Button type="primary" style={{ marginBottom: 16 }}>管理</Button>
    <Table
      columns={columns}
      dataSource={mockQualityInspections}
      rowKey="inspection_id"
    />
    </div>

  );
};

export default QualityInspectionList;